package models.common.entity;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Transient;

import play.db.jpa.Model;

import common.constants.ConfConst;
import common.constants.Constants;
import common.utils.Security;

/**
 * 担保信息表
 *@author fanghanyong
 *@version 2018-01-18 下午18:00:00
 */
@Entity
public class t_information_assurance extends Model{

	public t_information_assurance(){};
	
	/**申请时间*/
	public Date time;
	/**用户id*/
	public long user_id;
	/**状态*/
	public int status;
	/**授信申请表id*/
    public long credit_limit_id;
	/**合同编号*/
	public String contract_id;
	/**放款人id**/
	public long lender_id;
	/**放款人名称**/
	public String lender_name;
	
	/** 加密ID */
	@Transient
	public String sign;
	
	public int is_pledge_management;

	public String getSign() {
		return Security.addSign(this.id, Constants.BID_ID_SIGN,
				ConfConst.ENCRYPTION_KEY_DES);
	}
}
